<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>产品-产品详情</title>
<link href="__STATIC__/index/css/base.css" rel="stylesheet" type="text/css" />
<link href="__STATIC__/index/css/css1.css" rel="stylesheet" type="text/css" />
<link href="__STATIC__/index/css/style1.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="__STATIC__/index/css/goods_detail.css" />
<link rel="stylesheet" href="__STATIC__/index/css/common.css" />
<link rel="stylesheet" href="__STATIC__/index/css/goods.css" />
<style>
.goods_comment{
    border:1px solid #ccc;
}
.goods_comment .remind,.comment_info{
    padding-left: 30px;
    padding-top: 15px;
}
.goods_comment .remind h1{
    color: #333;
    font-size: 20px;
    font-weight: 700;
}
.tm-questions-title {
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #E7E7E7;
    padding-bottom: 9px;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 9px;
}
.option{
    overflow: hidden;
}
.option ul li{
    padding:0 5px;
    float: left;
}
.mycomment textarea{
    width: 500px;
    height: 150px;
}
.sub_comment{
    padding: 15px 0 ;
}
.sub_comment button{
    border: none;
    padding:10px 30px;
    background: #799e0f;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}
.continue{
    border:1px solid #f40;
    padding:15px 10px;
}
.continue h1{
    font-weight: 600;
    color:#999;
    font-size: 14px;
}
</style>
<script type="text/javascript" src="__STATIC__/index/js/jquery-1.8.3.min.js"></script>

<script src="__STATIC__/index/js/jquery.simpleGal.js"></script>
<script src="__STATIC__/index/js/jquery-1.2.6.pack.js"></script>
<script src="__STATIC__/index/js/base.js"></script>
<script src="__STATIC__/index/js/lib.js"></script>
<script src="__STATIC__/index/js/zzsc.js"></script>

<script type="text/javascript">
//弹出隐藏层
function ShowDiv(show_div,bg_div){
    document.getElementById(show_div).style.display='block';
    document.getElementById(bg_div).style.display='block' ;
    var bgdiv = document.getElementById(bg_div);
    bgdiv.style.width = document.body.scrollWidth;
    // bgdiv.style.height = $(document).height();
    $("#"+bg_div).height($(document).height());
};
//关闭弹出层
function CloseDiv(show_div,bg_div)
{
    document.getElementById(show_div).style.display='none';
    document.getElementById(bg_div).style.display='none';
};

</script>
</head>

<body>

<!--头部导航-->
<div class="nofix_head">
    <div class="top wrapper">
        <div class="float-lt margin-b10">
            <ul>
                {if $Think.session.user['id']}
                 <li>欢迎您，<a href="{:url('personal/index')}"><strong>{$Think.session.user['username']}</strong></a></li>
                 <li><a href="{:url('user/logout')}">退出</a></li>
                 {else}
                <li><a href="{:url('user/login')}" target="_blank" class=" colororange">请登录</a></li>
                <li><a href="{:url('user/register')}" target="_blank">注册会员</a></li>
                {/if}
            </ul>
        </div>
        <div class="float-rt">
            <ul>
                <li><a href="{:url('index/index')}" target="_blank">首页</a></li>
                <li><a href="{:url('personal/index')}">我的17</a></li>
                <li><a id="linkOrder" href="{:url('personal/order')}">我的订单</a></li>
                <li><a href="{:url('goods/index')}">商品分类</a></li>
                <li><a href="javascript:void(0);">我的购物车</a></li>
            </ul>
        </div>
    </div>
</div>
<!--头部导航END--> 

<!--头部快捷栏-->
<div class="clear wrapper header">
    <div class="logo float-lt" style="margin-right:130px;cursor: pointer;"><a href="{:url('index/index')}"><img src="__STATIC__/index/images/logo1.png" width="193" height="97" /></a></div>
    <div class="search float-lt">
        <div class="search_list">
            <ul>
                <li class="current"><a href="#">产品</a></li>
                <li><a href="#">信息</a></li>
            </ul>
        </div>
        <div class="clear search_cur">
            <ul>
                <li>
                    <input name="searchName" id="searchName" class="search_box" onkeydown="keyDownSearch()" type="text">
                </li>
            </ul>
            <ul>
                <li class="search_btn"><a href="product-list.html">搜索</a></li>
            </ul>
        </div>
        <div class="clear hotword">热门搜索词：香醋&nbsp;&nbsp;&nbsp;茶叶&nbsp;&nbsp;&nbsp;草莓&nbsp;&nbsp;&nbsp;葡萄&nbsp;&nbsp;&nbsp;菜油</div>
    </div>
</div>
<!--头部快捷栏END-->
<div class="clear">&nbsp;</div>

<!--网站头部-->
<div class="sup-wid">
    <div><img src="__STATIC__/index/images/TB27.gif" width="100%"/></div>

<div style="width: 980px;margin: 0 auto;">
<div class=" clear bread"><a href="#">首页</a> <span class="pipe">&gt;</span> <a href="#">某供应商</a> <span class="pipe">&gt;</span> <a href="#">某产品</a></div>
    <div class="pro_detail" >
            <div class="pro_detail_img float-lt">
                <div class="gallery" style="height: 380px;">
                    <div class=jqzoom id=spec-n1 ><img height=350
                    src="{$goods->picture}" width=350 />
                    </div>
                </div>
            </div>
    <div class="float-lt pro_detail_con">
        <div class="pro_detail_tit">{$goods->gname}</div>
        <div class="clear"></div>
        <div class="pro_detail_price  margin-t20"><span class="margin-r20">市场价</span><span style=" font-size:16px"><s>￥{$goods->market_price}</s></span></div>
        <div class="clear"></div>
        <div class="pro_detail_act margin-t20 fl"><span class="margin-r20">售价</span><span class="myprice" style="font-size:26px; font-weight:bold; color:#dd514c;">￥<b>{$goods->price}</b></span></div>
        <div class="clear"></div>
        <div class="act_block margin-t5"><span>本商品可使用9999积分抵用￥9.99元</span></div>
        <div class="pro_detail_number margin-t30">
        <div class="pro_detail_price  margin-t20"><span class="margin-r20">成交量</span><span style=" font-size:16px">{$goods->sales}</span></div>
            <div class="clear"></div>
        </div>
        <div class="guige">
            <div class="margin-r20 float-lt" style="line-height:25px;">规格</div>
            <ul>
                <li class="guige-cur">规格一</li>
                <li>规格二</li>
                <li>规格三</li>
            </ul>
            <div class="clear"></div>
        </div>

        <div class="clear"></div>
    </div>
</div>
<div class="clear"></div>

<div class="goods_comment" style="width: 100%;">
    {if $commented}
    <div class="continue"><h1>您已经评论过它们啦~</h1></div>
    {else}
    <div class="remind"><h1>您宝贵的建议，是我们最大的动力</h1></div>
    <div class="comment_info">
       <div class="tm-questions-title">关于描述</div>
       <div class="option">
           <ul>
               <li><input type="radio" name="description" value="1" />失望</li>
               <li><input type="radio" name="description" value="2"/>不满</li>
               <li><input type="radio" name="description" value="3"/>一般</li>
               <li><input type="radio" name="description" value="4"/>满意</li>
               <li><input type="radio" name="description" value="5" checked />惊喜</li>
           </ul>
       </div> 
       <div class="tm-questions-title">关于质量</div> 
       <div class="option">
           <ul>
               <li><input type="radio" name="quality" value="1" />失望</li>
               <li><input type="radio" name="quality" value="2"/>不满</li>
               <li><input type="radio" name="quality" value="3"/>一般</li>
               <li><input type="radio" name="quality" value="4"/>满意</li>
               <li><input type="radio" name="quality" value="5" checked />惊喜</li>
           </ul>
       </div> 
       <div class="tm-questions-title">关于服务</div> 
       <div class="option">
           <ul>
               <li><input type="radio" name="service" value="1" />失望</li>
               <li><input type="radio" name="service" value="2"/>不满</li>
               <li><input type="radio" name="service" value="3"/>一般</li>
               <li><input type="radio" name="service" value="4"/>满意</li>
               <li><input type="radio" name="service" value="5" checked />惊喜</li>
           </ul>
       </div> 
       <div class="tm-questions-title">关于物流</div> 
       <div class="option">
           <ul>
               <li><input type="radio" name="logistics" value="1" />失望</li>
               <li><input type="radio" name="logistics" value="2"/>不满</li>
               <li><input type="radio" name="logistics" value="3"/>一般</li>
               <li><input type="radio" name="logistics" value="4"/>满意</li>
               <li><input type="radio" name="logistics" value="5" checked />惊喜</li>
           </ul>
       </div> 
       <div class="tm-questions-title">我的评价</div>
       <div class="mycomment"><textarea name="" id="content" ></textarea>
       </div> 
       <div class="sub_comment"><button>提交评价</button></div>
    </div>
    {/if}
</div>
<script>
$(function(){
    $('.sub_comment button').click(function(){
        var gid = {$goods->id};
        var url = "{:url('goods/add_comment')}";
        var description = $('input[name="description"]:checked').val();
        var quality = $('input[name="quality"]:checked').val();
        var service = $('input[name="service"]:checked').val();
        var logistics = $('input[name="logistics"]:checked').val();
        var content = $('#content').val();
        var data = {
            'gid' : gid,
            'description' : description,
            'quality' : quality,
            'service' : service,
            'logistics' : logistics,
            'content' : content,
        };
        $.post(url,data,function(result){
            if (result.code ==1) {
                location.href = result.data;
            } else if(result.code ==0){
                alert(result.msg);
            }
        },'json');
    });
})
</script>
    <div class="pro_con margin-t55" style="overflow:hidden;">
        <div class="pro_tab">
            <ul>
                <li class="cur">累计评价（{$comments|count}）</a></li>
            </ul>
        </div>
        <div class="conlist">
            <div class="conbox" style="display: block;">
                <div class="pro_judge">
                    <ul>
                        <li class="cur">
                            <input name="RadioGroup1" type="radio" value="" checked="checked" id="RadioGroup1_0" />
                            全部（{$comments|count}）</li>
                        <li>
                            <input name="RadioGroup1" type="radio" value="" id="RadioGroup1_1" />
                            好评（{$comments|count}）</li>
                        <li>
                            <input name="RadioGroup1" type="radio" value="" id="RadioGroup1_2" />
                            中评（0）</li>
                        <li>
                            <input name="RadioGroup1" type="radio" value="" id="RadioGroup1_3" />
                            差评（0）</li>
                    </ul>
                    <table width="100%" border="0">
                        {volist name="comments" id="vo"}
                        <tr>
                            <td width="80" align="left"><a href=""  class="preview">
                            {if $vo.plphoto}
                            <img src="{$vo.plphoto}" width="60" height="60" class="border_gry" />
                            {/if}
                            </a>
                            </td>
                            <td>{$vo.content|empty ? '此用户没有填写评论！' : $vo.content}<br />
                                <br />
                                <span class="pro_judge_time">{$vo.create_time}</span></td>
                            <td>{$vo.uid|getUserById}</td>
                        </tr>
                        {/volist}
                    </table>
                </div>
            </div>
        </div>
    </div>  
</div>
<div class="clear">&nbsp;</div>
{include file="common/footer" /}
</div>

</div>
</body>
</html>
